﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace SWCInvoice.Model
{
    public class Culture
    {
        #region Fields

        /// <summary>
        /// The CultureInfo Object
        /// </summary>
        CultureInfo _cultureInfo;

        /// <summary>
        /// The name of the cultures
        /// </summary>
        string _name;

        /// <summary>
        /// The nativename of the cultures
        /// </summary>
        string _nativeName;

        /// <summary>
        /// The englishname of the cultures
        /// </summary>
        string _englishName;

        /// <summary>
        /// The picname of the cultures
        /// </summary>
        string _picName;

        #endregion

        #region Properties

        /// <summary>
        /// The CultureInfo Object
        /// </summary>
        public CultureInfo CultureInfo 
        {
            get
            {
                return _cultureInfo;
            }
            set
            {
                _cultureInfo = value;
            }
        }

        /// <summary>
        /// The name of the cultures
        /// </summary>
        public string Name
        {
            get
            {
                return _name;
            }
            set
            {
                _name = value;
            }
        }

        /// <summary>
        /// The nativename of the cultures
        /// </summary>
        public string NativeName
        {
            get
            {
                return _nativeName;
            }
            set
            {
                _nativeName = value;
            }
        }

        /// <summary>
        /// The englishname of the culture
        /// </summary>
        public string EnglishName
        {
            get
            {
                return _englishName;
            }
            set
            {
                _englishName = value;
            }
        }

        /// <summary>
        /// The picname of the culture
        /// </summary>
        public string PicName
        {
            get
            {
                return _picName;
            }
            set
            {
                _picName = value;
            }
        }

        #endregion

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="culture">culture string</param>
        /// <param name="picName">picture path</param>
        public Culture(string culture, string picName)
        {
            CultureInfo = new CultureInfo(culture);
            Name = CultureInfo.Name;
            NativeName = CultureInfo.NativeName;
            EnglishName = CultureInfo.EnglishName;
            PicName = picName;
        }
    }
}
